﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows.Forms;

namespace RSSP1
{
    class HD_RTF
    {
        public static string RtfPath = "RichBoxText.rtf";

        public static void RTF_SaveRichTextBoxToFile(RichTextBox richTextBox)
        {
            SaveFileDialog saveFile1 = new SaveFileDialog();
            saveFile1.DefaultExt = "*.rtf";
            saveFile1.Filter = "RTF Files|*.rtf";
            if (saveFile1.ShowDialog() == System.Windows.Forms.DialogResult.OK &&
             saveFile1.FileName.Length > 0)
            {
                richTextBox.SaveFile(saveFile1.FileName);
            }
        }

        public static void RTF_LoadFileToRichTextBox(RichTextBox richTextBox,string filePath)
        {
            richTextBox.LoadFile(filePath);
        }
    }
}
